<?php
require_once (APPLICATION_DIR."/application/model/Question.php");

class Question extends DataObjects_Question
{
    function getAllQuestionInfo()
    {
        $this->selectAdd();
        $this->selectAdd("*");
        $this->find();
        return $this;
    }
    
	function getQuestionInfoByID($question_id)
	{
	    $this->selectAdd();
        $this->selectAdd("*");
        $this->whereAdd();
        $this->whereAdd("question_id = $question_id");
        $this->find();
        return $this;
	}
	
	function updateQuestion($args)
	{
	    $this->question_id      = $args['question_id'];
	    $this->question_detail  = $args['question_detail'];
	    $this->question_answer  = $args['question_answer'];
	    $this->update();
	}
	
	function deleteQuestion($question_id)
	{
	    $this->question_id      = $question_id;
	    $this->delete();
	}
}

?>